/**
 * Created by xingkaihang on 2017/5/24.
 */
import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import {Icon,Badge,Tooltip} from 'antd';
import './header.scss'

export default class Header extends Component {

    handleSearch(e) {
        if (e.which === 13) {
            alert('搜索功能尚未添加...')
        }
    }

    render() {
        return (
            <div className="head-wrapper">
                <div className="head-left">
                    <span className="logo"/>
                </div>
                <div className="head-right">
                    <input
                        type="text"
                        placeholder="搜索..."
                        className="head-search"
                        onKeyDown={(e) => this.handleSearch(e)}
                    />
                    <div className="head-right-btn">
                        <Tooltip placement="bottom" title="退出">
                            <Icon type="poweroff" className="font-md pointer-hover" />
                        </Tooltip>

                        <Tooltip placement="bottom" title="登录">
                            <Icon type="login" className="font-md pointer-hover" />
                        </Tooltip>

                        <Tooltip placement="bottom" title="设置">
                            <Badge dot className="padding-lr-md">
                                <Icon type="chrome" className="font-md pointer-hover" />
                            </Badge>
                        </Tooltip>
                    </div>
                </div>
            </div>
        );
    }
}

